package com.leoman.dao;

import com.leoman.entity.LetterAnnex;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * LetterAnnexDao
 * Created by 涂奕恒 on 2016/11/23 0023 下午 3:43.
 */
public interface LetterAnnexDao extends JpaRepository<LetterAnnex, Integer>, JpaSpecificationExecutor<LetterAnnex> {

    @Query("select a from LetterAnnex a where a.type = ?1")
    List<LetterAnnex> findListByType(Integer type);
}